At present, perhaps video games are the most commonly known form of computer graphics apparatus. However, the field embraces many other forms of apparatus, as for use in training, design, modeling and so on. Typically, such apparatus give the viewer the impression of looking through a window at a picture somewhat like that of a television receiver. To generate the picture, the computer graphics system selects content from basic forms (primitives) orients the selected-pieces with respect to the window and displays them on a viewing screen as a composite.
According to one technique, picture content is developed from primitives as polygons, i.e. closed outlines bounded by straight edges. Such polygons define outlines of solid areas of gray or color and are joined to form an object or a part of an object in the desired display. Usually, the polygons are mathematically defined in three-dimensional, world space. Conventional basic practice involves orienting such polygons with respect to a viewpoint, scanning the polygons to define data for small, individual picture areas or elements (pixels), eliminating hidden surface representations, then displaying the pixels in a perspective array on a two-dimensional screen. Essentially, the scan conversion of a polygon involves finding all the pixels that lie inside each polygon and accordingly setting the color and intensity contribution for each pixel. In a typical display, a million pixels may compose a picture.
In accordance with prior computer graphics techniques, the picture image is stored as a pattern of binary digital numbers that represent individual pixels in a rectangular array. The numerical data representative of individual pixels is supplied in sequence to a cathode ray tube apparatus-as the tube screen is scanned to display the pixels in the rectangular array. Accordingly, the pixels are presented in a raster pattern as a succession of scan lines, each of which consists of a row of pixels. The raster pattern is most familiar in television displays.
As mentioned above, computer graphics systems are capable of providing realistic images from primitives which may take the form of planar polygons. The generation of such images also involves subdividing polygons and selecting the portions of such polygons that are unobstructed to the viewer and accordingly appear in the display. In that regard, several hidden surface techniques are well known. In summary, the present state of the art in computer graphics allows the generation of dynamic realistic images by processors utilizing the techniques described above.
When geometric primitives other than planar polygons are used for model definition, the primitives often are decomposed into planar polygons, which thereafter may be further decomposed into triangular polygons for processing, as to provide better simulation or remove hidden surfaces. For example, a curved or parametric surface of a display object may be decomposed by subdivision as well known in the prior art and as treated in U.S. Pat. No. 4,646,251, issued Feb. 24, 1987, to Hayes, Brown, Jensen and Madsen.
While defining planar polygons to compose a picture is effective, the technique still provides an unrealistic picture. For example, it is desirable that the image of a cylinder appear as a cylinder, not as an array of discrete planar polygons joined together to approximate a cylinder. However, such shapes attain greater realism if they are smooth shaded over the surface of several polygons. The technique is illustrated and described in a book entitled, Principles of Interactive Computer Graphics, Second edition, Newman & Sproull, McGraw-Hill Book Company, 1979. Various specific shading techniques are well known in the art, and in that regard the referenced book describes both Gouraud and Phong shading techniques.
The Gouraud technique of smooth shading involves computing normals at the vertices (corners) of each polygon then computing the precise shade at each of the vertices. An interpolation is then performed to determine the shade for each pixel dissecting the polygon. Traditionally, the interpolation is performed on each polygon as it exists in perspective or screen space. That is, shading is performed after polygons have been transformed from world space to screen space. In that regard, see Chapter 22 of the referenced book, Principles of Interactive Computer Graphics, at page 339, a section captioned "Transformations in Viewing". A similar situation exists with respect to interpolation of polygons for Phong shading.
In addition to shading, another property of surfaces is their texture. Essentially, while surfaces modeled by polygons are smooth, realism can be enhanced by providing texture. Also, color patterns may be provided as a further element of texture. With regard to texture, see the book entitled, Principles of Interactive Computer Graphics, as referenced above, a section beginning on page 407. In a related regard, non-uniform texture mapping is well known in the art as treated in an article entitled, "Survey of Texture Mapping" by Paul S. Heckbert, published in IEEE Computer Graphics and Applications, November 1986, pp. 56-67.
Recapitulating to some extent, planar polygons (transformed to perspective or screen space) traditionally have been interpolated for shading or texturing. However, the transformation of polygons from world space to screen space involves a nonlinear projection. As a consequence, interpolating a polygon (for shading or texturing) after transformation to screen space is quite different from interpolating the same polygon in world space. Specifically, interpolations in screen space are subject to nonlinear distortion.
Although, traditionally, polygons have been interpolated in screen space, such interpolation is erroneous and deters from the displayed image. In that regard, the present invention is based on a recognition that considerably improved displays result from the interpolation, for example in world space, that is, in space that is not subject to nonlinear distortion. This improvement also may be obtained through interpolation of polygons in spaces other than world space which are not subject to the nonlinear distortion of screen space. An example of another space not subject to nonlinear distortion is eye space. However, in the past, the data for such interpolation in spaces such as world space or eye space was not considered to be economically feasible for use.
Considering another aspect of computer graphics, it has been proposed to better simulate the perspective of actual vision by altering the level of detail shown as an object moves away from the view point. For example, while the texture or pattern on a nearby object may be clear and crisp, the texture on a remote object appears fuzzy and ultimately merges to a uniform color. To accommodate the phenomena, it has been proposed to vary the texture on an object as the range changes. One such technique is disclosed in a paper entitled, "Pyramidal Parametrics" by Lance Williams, published July 1983 in Computer Graphics, Volume 17, No. 3. The article has been identified by the Association for Computing Machinery as ACM 0-89791-109-1/83/007/0001.
Generally, although various texture mapping techniques have improved computer graphic images, prior techniques along with antialiasing of the texture involve troublesome and voluminous computations. For example, substantial computation has been required to determine a parameter for use in selecting an appropriate scale of fuzziness based on object proximity.
Summarizing to some extent, the system of the present invention is based on recognizing the need for an ability to calculate in a coordinate space that is not subject to nonlinear distortion with respect to primitives defined by screen space. For example, the system of the present invention interpolates using areas in space not subject to nonlinear distortion, where those areas are defined in screen space. The system next determines differentials (rates of change) in space not subject to nonlinear distortion, as for texture mapping. The differentials are variously used to facilitate the generation of a picture, for example to texture a polygon.
The system of the present invention may be embodied as an effective process or product using parameters in a coordinate space that is not subject to nonlinear distortion and differentials for calculations, as to interpolate planar polygons, and accomplish smooth shading or texturing for an object defined by the polygons. Interpolation in accordance with the present invention is performed on planar polygons defined in space not subject to nonlinear distortion and thus enables improved displays. That is, the present system develops data from screen space to world,space for interpolations.
For example, the system of the present invention facilitates world-space calculations involving differentials by utilizing data in unconventional combinations. Readily available vectors, susceptible to manipulation as dot products and cross products, accomplish the interpolation of a polygon in world space and may be used to effectively shade or texture objects composed of such polygons using differentials.
To further consider a specific example, the system of the present invention may be implemented to texture a primitive polygon in a graphic image. Parameters for the image are selected including parameters defining screen space. With respect to the polygon, areas, specified as pixels, are defined in screen space then related to world space. Texture data is specified or defined in world space along with the polygon. Utilizing a differential of at least one variable, e.g. texture coordinate values (du, dv) an interpolation is performed with respect to the area in world space to provide display data. Thus, values indicating differentials may be in relation to texture coordinates (u and v) for selection of a texture scale. Various other picture computations also may be facilitated by the utilization of differentials.